package logic.newLogic2;

import logic.Algorithm;
import data.UserTuple;
import guiDisplay.RecommendationList;

public class AlgoHandler3 {
	private Algorithm algo_;
	public AlgoHandler3(Algorithm algo){
		algo_=algo;
	}
	public RecommendationList setRecommendation(String userName, int start) {
		UserTuple user=data.SystemData.getInstance().getUser(userName);
		if (Facade3.getInstance().getNumRating(userName) <10){
			user.setDefaultRecs();
			user.setDateOfRecs();
		}else {
			user.setRecs(algo_.compute(user));
			user.setDateOfRecs();
		}
		return user.getRecs(start);
		
	}

}
